package cn.jiyun.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置类
 */
@Configuration
public class UserConfig {

    /**
     * 读取配置文件，并封装到对象中
     */
    @Bean
    @ConfigurationProperties(prefix = "user")
    public User user(){
        User user = new User();
        return user;
    }

}
